/* eslint-disable react/no-array-index-key */
import React from 'react';
import { Row } from 'antd';
import styles from './index.less';

export default function Operates({ operates = [], spaceSplit }) {
    const arr = operates.filter(_ => _).filter(_ => React.isValidElement(_));
    return (
        <Row type="flex" align="middle" className={spaceSplit ? styles.spaceSplit : styles.commonSplit}>
            {arr.map((item, key) => (
                <React.Fragment key={key}>{item}</React.Fragment>
            ))}
        </Row>
    );
}
